CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/software/octave/[name].tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Alert, Layout } from "antd";
7
8
import { SoftwareEnvNames } from "@cocalc/util/consts/software-envs";
9
import Footer from "components/landing/footer";
10
import Head from "components/landing/head";
11
import Header from "components/landing/header";
12
import Image from "components/landing/image";
13
import SoftwareLibraries from "components/landing/software-libraries";
14
import { Paragraph, Title } from "components/misc";
15
import A from "components/misc/A";
16
import { Customize, CustomizeType } from "lib/customize";
17
import { ExecutableDescription } from "lib/landing/render-envs";
18
import { withCustomizedAndSoftwareSpec } from "lib/landing/software-specs";
19
import {
20
ComputeComponents,
21
ComputeInventory,
22
SoftwareSpec,
23
} from "lib/landing/types";
24
import { STYLE_PAGE } from "..";
25
import screenshot from "/public/features/cocalc-octave-jupyter-20200511.png";
26
27
interface Props {
28
name: SoftwareEnvNames;
29
customize: CustomizeType;
30
spec: SoftwareSpec["octave"];
31
inventory: ComputeInventory["octave"];
32
components: ComputeComponents["octave"];
33
execInfo?: { [key: string]: string };
34
timestamp: string;
35
}
36
export default function Octave(props: Props) {
37
const { name, customize, spec, inventory, components, execInfo, timestamp } =
38
props;
39
40
function renderBox() {
41
return (
42
<Alert
43
style={{ margin: "15px 0" }}
44
message="Learn More"
45
description={
46
<span style={{ fontSize: "10pt" }}>
47
Learn more about{" "}
48
<strong>
49
<A href="/features/octave">
50
GNU Octave related functionality in CoCalc
51
</A>
52
</strong>
53
.
54
</span>
55
}
56
type="info"
57
showIcon
58
/>
59
);
60
}
61
62
function renderInfo() {
63
return (
64
<>
65
<div style={{ width: "50%", float: "right", padding: "0 0 15px 15px" }}>
66
<Image src={screenshot} alt="Using Octave in a Jupyter notebook" />
67
</div>
68
<Paragraph>
69
This table lists pre-installed{" "}
70
<A href="https://www.gnu.org/software/octave/">GNU Octave</A> packages
71
that are immediately available in every CoCalc project running on the
72
default "Ubuntu {name}" image, along with their respective version
73
numbers.
74
</Paragraph>
75
</>
76
);
77
}
78
79
return (
80
<Customize value={customize}>
81
<Head title="Octave Packages in CoCalc" />
82
<Layout>
83
<Header page="software" subPage="octave" softwareEnv={name} />
84
<Layout.Content
85
style={{
86
backgroundColor: "white",
87
}}
88
>
89
<div style={STYLE_PAGE}>
90
<Title level={1} style={{ textAlign: "center" }}>
91
GNU Octave Scientific Programming Packages (Ubuntu {name})
92
</Title>
93
{renderInfo()}
94
{renderBox()}
95
<ExecutableDescription spec={spec} execInfo={execInfo} />
96
<SoftwareLibraries
97
spec={spec}
98
inventory={inventory}
99
components={components}
100
libWidthPct={60}
101
timestamp={timestamp}
102
/>
103
</div>
104
<Footer />
105
</Layout.Content>
106
</Layout>
107
</Customize>
108
);
109
}
110
111
export async function getServerSideProps(context) {
112
return await withCustomizedAndSoftwareSpec(context, "octave");
113
}
114
115